1. Field of the Invention
The present invention relates to an image feature extraction method, and image processing using the image feature extraction method.
2. Description of the Related Art
A technique of extracting the contour of an object in an image by using image features near pixels as contour candidates is known. Japanese Patent Laid-Open No. 8-16793 discloses a technique in which when extracting an edge area, a threshold for identifying the edge area or other areas is changed based on the statistical feature amount of pixels within a predetermined mask area around a pixel of interest and the edge intensity of the pixel of interest. This allows an edge area to be reliably and efficiently identified as compared with a method to identify an edge area using a fixed threshold.
Japanese Patent Laid-Open No. 5-324830 discloses a contour tracking method. In this method, one pixel on the contour of an object in an image is considered as an initial point, and pixels within a predetermined range from that pixel are determined as contour candidate points. Based on image data indicating the colors of each contour candidate point and pixels around it, it is determined whether a corresponding contour candidate point serves as a point on the contour to track the contour.
In the above techniques, however, it is impossible to automatically determine an appropriate range or the area of a shape when setting a neighboring area of the pixel of interest.
In the technique disclosed in Japanese Patent Laid-Open No. 8-16793, a mask area is set for a specified point in an image. There is, however, left unsolved a problem of how to determine the shape and range of the mask area. If an image in an environment where the background is complex is to be processed, there is not only a boundary which divides an area into two parts but also a junction such as a T-junction. In this case, it is impossible to simply set an inner or outer area as a mask area, and it is necessary to set a mask area in consideration of the shape of the contour and a surrounding luminance gradient.
In the technique disclosed in Japanese Patent Laid-Open No. 5-324830, based on image data indicating the colors of each contour candidate point and pixels around it, whether the corresponding contour candidate point serves as a point on the contour is determined. It is, however, impossible to determine a range of pixels around each candidate point to be considered. If, for example, only neighboring pixels are considered to fall within the range, the influence of image noise is great. It is, therefore, necessary to set a neighboring area having an appropriate range, and to attempt to reduce the influence of noise by using a statistical amount such as the average value or histogram of pixel values in the area. At this time, if a large area relative to a degree of unevenness of the contour or an area having an inappropriate shape for the shape of the contour is set especially in the vicinity of a target contour, a pixel group belonging to the background may be included in an area which should essentially include only a pixel group belonging to the target contour. In this case, as described above, it is necessary to set a partial area in consideration of the shape of the contour and a surrounding luminance gradient.
As a method of setting a partial area in accordance with a surrounding luminance gradient, Harris-Affine Region Detector is well known. Harris-Affine Region Detector is described in Krystian Mikolajczyk and Cordelia Schmid, “Scale & Affine Invariant Interest Point Detectors, “International Journal of Computer Vision, 60(1), pp. 63-86, 2004.
This technique is used to associate, if there are two images which are obtained when the same scene or object is viewed from different angles, partial images with each other. When applying this technique to a method of extracting a contour by sequentially connecting the contours of objects, such as the contour tracking method, it is necessary to associate parts belonging to a target object in a partial image because of a nonuniform background in an actual image.